import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2025-09-12
 * Time: 11:04
 */
public class demo1 {
    public static void main(String[] args) {
        Random random = new Random();
        System.out.println("输入一个数：");
        Scanner sc = new Scanner(System.in);

        int toGuess = random.nextInt(100);
        while(true){
            int num = sc.nextInt();
            if(num > toGuess){
                System.out.println("大了");
            }else if(num < toGuess){
                System.out.println("小了");
            }else{
                System.out.println("对了");
                break;
            }
        }
        sc.close();
    }
}
